home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
systems
/
mac
/
oztex
/
mf.hqx
/
Metafont
/
mf.rsrc
/
TEXT_128_Info.txt
< prev
next >
Wrap
Text File
|
1995-01-27
|
7KB
|
143 lines
Metafont reads the program in the specified files and out-
puts font rasters (in gf format) and font metrics (in tfm
format). The Metafont language is described in The
Metafontbook.
Like TeX, Metafont is normally used with a large body of
precompiled macros, and font generation in particular
requires the support of several macro files. The default
base file for bigmf is bigmf.base while for smallmf it is
smallmf.base. To run Metafont, launch either smallmf or
bigmf. At the "mf" prompt type a line like
\mode=<printengine>; [mag=magstep(n);] input font
to start processing font.mf. Other control sequences,
such as batchmode (for silent operation) can also appear.
The name font will be the jobname, and is used in forming
output file names. If Metafont doesn't get a file name,
the jobname is mfput. The default extension, .mf, can be
overridden by specifying an extension explicitly.
A log of error messages goes into the file jobname.log.
The output files are jobname.tfm and jobname.<number>gf,
where <number> depends on the resolution and magnification
of the font. The mode in this example is shown generi-
cally as <printengine>, a symbolic term for which the name
of an actual device or, most commonly, the name localfont
(see below) must be substituted. If the mode is not speci-
fied or is not valid for your site, Metafont will default
to proof mode which produces large character images for
use in font design and refinement. Proof mode can be rec-
ognized by the suffix .2602gf after the jobname. Examples
of proof mode output can be found in Computer Modern Type-
faces (Volume E of Computers and Typesetting). The system
of magsteps is identical to the system used by TeX, with
values generally in the range 0.5, 1.0, 2.0, 3.0, 4.0 and
5.0. A listing of gf numbers for 118-dpi, 240-dpi and
300-dpi fonts is shown below.
MAGSTEP 118 dpi 240 dpi 300 dpi
mag=magstep(0) 118 240 300
mag=magstep(0.5) 129 263 329
mag=magstep(1) 142 288 360
mag=magstep(2) 170 346 432
mag=magstep(3) 204 415 518
mag=magstep(4) 245 498 622
mag=magstep(5) 294 597 746
Magnification can also be specified not as a magstep but
as an arbitrary value, such as 1.315, to create special
character sizes.
Before font production can begin, it is necessary to set
up the appropriate base files. The minimum set of compo-
nents for font production for a given print-engine is the
plain.mf macro file and the local mode_def file. The
macros in plain.mf can be studied in an appendix to the
Metafontbook; they were developed by Donald E. Knuth, and
this file should never be altered except when it is offi-
cially upgraded. Each mode_def specification helps adapt
fonts to a particular print-engine. There is a regular
discussion of mode_defs in TUGboat, the journal of the TeX
Users Group. The local ones in use on this computer
should be in modes.mf.
A convenient file in the mfinputs folder is null.mf, which
contains nothing. When mf can't find the file it thinks
you want to input, it keeps asking you for another file
name; responding `null' gets you out of the loop if you
don't want to input anything.
ONLINE GRAPHICS OUTPUT
Metafont can use most modern displays, so you can see its
output without printing. Chapter 23 of The Metafontbook
describes what you can do. This implementation of Meta-
font uses a special graphics window to display fonts. You
should input either macse.mf or macii.mf (or any similar
file of your own) in order to activate the graphics window.
VARIABLES
The file texmf.env contains the definitions of the environ-
mental variables used by Metafont. The important ones are
MFINPUTS Search path for input and openin files.
MFBASES Search path for base files.
MFPOOL Search path for Metafont interna strings. (Used
by inimf only.)
FONT UTILITIES
A number of utility programs are available. The following
is a partial list of available utilities and their pur-
pose. Consult your local Metafont guru for details.
gftopk Takes a gf file and produces a more tightly
packed pk font file.
gftodvi Produces proof sheets for fonts.
gftype Displays the contents of a gf file in mnemonics
and/or images.
pktype Mnemonically displays the contents of a pk file.
mft Formats a source file as shown in Computer Modern
Typefaces.
SUGGESTED READING
Donald E. Knuth, The Metafontbook (Volume C of Computers
and Typesetting), Addison-Wesley, 1986, ISBN
0-201-13445-4.
Donald E. Knuth, Metafont: The Program (Volume D of Com-
puters and Typesetting), Addison-Wesley, 1986, ISBN
0-201-13438-1.
Donald E. Knuth, Computer Modern Typefaces (Volume E of
Computers and Typesetting), Addison-Wesley, 1986, ISBN
0-201-13446-2.
TUGboat (the journal of the TeX Users Group).
COMMENTS
Warning: ``Type design can be hazardous to your other
interests. Once you get hooked, you will develop intense
feelings about letterforms; the medium will intrude on the
messages that you read. And you will perpetually be
thinking of improvements to the fonts that you see every-
where, especially those of your own design.''
BUGS
On January 4, 1986 the ``final'' bug in Metafont was dis-
covered and removed. If an error still lurks in the code,
Donald E. Knuth promises to pay a finder's fee which dou-
bles every year to the first person who finds it. Happy
hunting.
AUTHORS
Metafont was designed by Donald E. Knuth, who implemented
it using his Web system for Pascal programs. It was orig-
inally ported to UNIX by Paul Richards at the University
of Illinois at Urbana-Champaign. This page was mostly
written by Pierre MacKay.